package cn.loioi.activiti.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class EndExamineListener implements ExecutionListener {
	private final Logger logger = LoggerFactory.getLogger(EndExamineListener.class);
	private static final long serialVersionUID = 1L;

	@Override
	public void notify(DelegateExecution execution) throws Exception {
		logger.debug("申请人:" + execution.getVariable("applyUser").toString());
		if ("true".equals(execution.getVariable("approve"))) {
			logger.debug("审核已通过!");
		} else if ("true".equals(execution.getVariable("repeatApply"))) {
			logger.debug("审核已重新提交!");
		} else {
			logger.debug("审核已取消!");
		}
	}

}
